#include "Vector.h"

namespace ouyang
{
	void Text_Vector01()
	{
		vector<int> v;
		v.push_back(1);
		v.push_back(2);
		v.push_back(3);
		v.push_back(4);
		v.push_back(5);
		PrintVector(v);
	}

	void Text_Vector02()
	{
		vector<int> v;
		size_t sz = v.capacity();
		cout << "first of capacity:" << sz << '\n';
		cout << "making v a grow:" << '\n';
		for (size_t i = 1; i < 100; i++)
		{
			v.push_back(i);
			if (sz != v.capacity())
			{
				sz = v.capacity();
				cout << "capacity charged:" << sz << endl;
			}
		}

		// PrintVector(v);
	}

	void Text_Vector03()
	{
		vector<int> v;
		v.push_back(1);
		v.push_back(2);
		v.push_back(3);
		v.push_back(4);
		v.push_back(5);
		v.pop_back();
		v.pop_back();
		v.pop_back();
		v.pop_back();

		PrintVector(v);
	}

	void Text_Vector04()
	{
		vector<int> v;
		v.push_back(1);
		v.push_back(2);
		v.push_back(3);
		v.push_back(4);
		v.push_back(5);

		for (size_t i = 0; i < v.size(); i++)
		{
			cout << v[i] << " ";
		}
		cout << endl;
	}

}


	int main()
	{
		//Text_Vector01();
		//Text_Vector02();
		//ouyang::Text_Vector03();
		ouyang::Text_Vector04();
		return 0;
	}